<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    function address_multi_line ($address1, $address2, $address3, $address4, $address5, $postcode)
    {
        $lines = array();
        
        array_push ($lines, $address1);
        
        if (strlen ($address2) > 0)
            array_push ($lines, $address2);
        
        if (strlen ($address3) > 0)
            array_push ($lines, $address3);
        
        if (strlen ($address4) > 0)
            array_push ($lines, $address4);
        
        if (strlen ($address5) > 0)
            array_push ($lines, $address5);
        
        array_push ($lines, $postcode);
        
        return $lines;
    }
?>